Temporal correlation of messages transmitted by a microprocessor monitoring circuit

ABSTRACT

The invention concerns a method for transmitting digital messages through output terminals ( 22 ) of a monitoring circuit ( 18 ) integrated to a microprocessor ( 12 ), said messages representing specific events occurring upon the execution of instructions by the microprocessor comprising the step which consists, after or before transmitting at least one specific message associated with a particular event in transmitting a correlation message including an identified of said specific message and a counter for the number of instructions executed by the microprocessor between the instruction associated with the transmission of said specific message and the instruction associated with a selected previous message. The invention also concerns a device for transmitting digital messages.

The present invention relates to the testing of microprocessors. It morespecifically relates to a method and device of digital data transmissionbetween a monitoring circuit integrated in a microprocessor chip and ananalysis tool.

FIG. 1 schematically shows an integrated circuit 10 comprising amicroprocessor (μP) 12, an internal memory (MEM) 14, and input/outputterminals (I/O) 16. Microprocessor 12 is intended to execute a programor a software stored in memory 14. Under control of the program,microprocessor 12 may process data provided by input/output terminals 16or stored in memory 14 and read or write data through input/outputterminals 16.

To check the proper operation of the microprocessor, a monitoringcircuit 18 (TEST) is generally integrated to integrated circuit 10.Monitoring circuit 18 is capable of reading specific data provided bymicroprocessor 12 on execution of a program, and of possibly processingthe read data. Test terminals 22 connect monitoring circuit 18 to ananalysis tool 24. Analysis tool 24 may process the received signals, forexample, according to commands provided by a user, and ensure a detailedanalysis of the operation of microprocessor 12. In particular, analysistool 24 may determine the program instruction sequence really executedby microprocessor 12.

The number of test terminals 22 may be on the same order of magnitude asthe number of input/output terminals 16, for example, from 200 to 400terminals. Test terminals 22 as well as the connections of monitoringcircuit 18 take up a significant silicon surface area, which causes anunwanted increase in the circuit cost. For this purpose, a first versionof integrated circuit 10 comprising monitoring circuit 18 and testterminals 22 is produced in small quantities to debug the program ofmicroprocessor 12 or “user program”. After this debugging, a version ofintegrated circuit 10 rid of monitoring circuit 18 and of test terminals22 is sold. This implies the forming of two versions of the integratedcircuit, which requires a significant amount of work and is relativelyexpensive. Further, the final chip is not necessarily identical to thetested chip.

To overcome the above-mentioned disadvantages, it is desired to form amonitoring circuit 18 which takes up a reduced surface area and onlyrequires a reduced number of test terminals 22, which decreases theselfcost of the monitoring circuit. Monitoring circuit 18 can then beleft on the finally sold integrated circuit 10.

It is thus desired to decrease the number of signals provided bymonitoring circuit 18. For this purpose, certain logic operations aredirectly performed at the level of monitoring circuit 18 on the datameasured at the level of microprocessor 12 to only transmit messageshaving an important information content.

Thus, standard IEEE-ISTO-5001 in preparation provides in its 1999version, accessible, for example, on websitewww.ieee-isto.org/Nexus5001, a specific message exchange protocolbetween a monitoring circuit and an analysis tool for a monitoringcircuit 18 requiring but a reduced number of test terminals 22.

Among the messages provided by monitoring circuit 18 according tostandard IEEE-ISTO-5001, program tracing messages and data messages aredistinguished. Program tracing messages provide information relative tothe order of execution of the program by microprocessor 12. It may forexample be a message indicating that a jump has occurred in the programexecuted by microprocessor 12. Data messages correspond to the othermessages provided by monitoring circuit 18 and especially provideinformation relative the data processed by the microprocessor. It may bea message representative of a data read or write operation in an area ofmemory 14.

Based on the program tracing messages transmitted by monitoring circuit18, analysis tool 24 attempts to reconstitute the instruction sequenceexecuted by microprocessor 12. The reconstituted instruction sequencecan then be compared to an instruction sequence theoretically executedby microprocessor 12 to determine malfunctions of microprocessor 12.

When monitoring circuit 18 transmits to analysis tool 24 the programtracing and data messages altogether, analysis tool 24 generally canassign to each received message a specific instruction of the program bymeans of adapted algorithms. However, to avoid for the data transmissionfrequency of monitoring circuit 18 to exceed the passband imposed by thetechnologies used to form the intermediary elements between monitoringcircuit 18 and test terminals 22, that is, to avoid saturation ofmonitoring circuit 18, only some of the messages provided by standardIEEE-ISTO-5001 are generally transmitted on a same program portion. Forexample, only the read operations concerning a specific area of memory14 may be subject to the message transmission to analysis tool 24. Insuch an example, when analysis tool 24 successively receives severaldata messages between two program tracing messages, it may be difficultto have a specific program instruction correspond to each received datamessage if, between the two program instructions corresponding to thetwo program tracing messages, there exist a significant number ofinstructions from which the received data messages can originate. Theestablishing of correspondences is more difficult still, or evenimpossible in certain cases, for example when an indirect addressingmode is used. An example of use of an indirect addressing modecorresponds to an operation of reading or writing of data associatedwith a program instruction which does not explicitly comprise theaddress of a register of the memory into or from which the data must bewritten or read, but which comprises the address of a register in whichis stored the address of the memory register into or from which the datamust be written or read. In the case where several program instructionsassociated with a read or write operation are neighbors and refer to asame register, it can then be difficult, or even impossible, toestablish the correspondence between the received messages and thecorresponding instructions.

Standard IEEE-ISTO-5001 also provides periodic transmission of aspecific program tracing message called the synchronization messagecomprising the complete address of the instruction just executed bymicroprocessor 12 at the time when the synchronization message has beengenerated by monitoring circuit 18. The synchronization messages enableanalysis tool 24 to check that it is performing a correct correlationbetween the received messages and the program instructions executed bymicroprocessor 12, and if not, adjusting the correlation. Asynchronization message is also punctually transmitted when monitoringcircuit 18 starts the transmission of messages to analysis tool 24 orinterrupts it.

A possibility to ease the correlation between messages received byanalysis tool 24 and program instructions would consist of transmittinga synchronization message with each data message. However, the coding ofthe complete address which is contained in a synchronization messagerequires a significant number of bits. The systematic use ofsynchronization messages would thus risk saturating monitoring circuit18. Further, as already explained, synchronization messages have alreadybeen transmitted periodically or punctually to analysis tool 24 forother purposes. It would then be difficult for analysis tool 24 to makethe difference between synchronization messages associated with datamessages and synchronization messages periodically or punctuallytransmitted.

The present invention provides a device and a method for transmittingdigital messages between a circuit for monitoring a microprocessor andan analysis tool enabling the analysis tool to perform a correctcorrelation between the received messages and instructions of theprogram executed by the micro-processor.

The present invention also enables not modifying the messages alreadyprovided by standard IEEE-ISTO-5001.

To achieve these objects, the present invention provides a method fortransmitting digital messages through output terminals of a monitoringcircuit integrated to a microprocessor, said messages beingrepresentative of determined events occurring on execution ofinstructions by the microprocessor, comprising the step of, after orbefore transmission of at least one specific message associated with aspecific event, transmitting a correlation message comprising anidentifier of said specific message and a counter of the number ofinstructions executed by the microprocessor between the instructionassociated with the transmission of said specific message and theinstruction associated with the transmission of a selected previousmessage.

According to an embodiment of the present invention, the selectedprevious message is the immediately preceding specific message.

According to an embodiment of the present invention, the correlationmessage comprises a correlation message identifier.

According to an embodiment of the present invention, the specificdigital message is representative of a data read or write instruction.

According to an embodiment of the present invention, the specificdigital message is representative of an event independent from theexecution of an instruction by the microprocessor.

According to an embodiment of the present invention, the transmitteddigital messages are received by an analysis tool capable of associatingbased on correlation messages an instruction executed by themicroprocessor with each transmitted digital message.

The present invention also provides a device for transmitting digitalmessages through output terminals of a monitoring circuit integrated toa microprocessor, said digital messages being representative ofdetermined events occurring on execution of instructions by themicroprocessor, comprising a means for detecting whether a message to betransmitted by the monitoring circuit is of a specific type; and a meansfor transmitting, after or before transmission of a digital message ofsaid specific type, a correlation message, said monitoring messagecomprising an identifier of said specific digital message and a counterof the number of instructions executed by the microprocessor between theinstruction associated with the transmission of the specific digitalmessage and the instruction associated with the transmission of aselected previous digital message.

The foregoing and other objects, features, and advantages of the presentinvention will be discussed in detail in the following non-limitingdescription of specific embodiments in connection with the accompanyingdrawings, among which:

FIG. 1, previously described, very schematically shows the architectureof a conventional chip integrating a microprocessor and a monitoringdevice; and

FIG. 2 shows an example of a message according to the present inventiontransmitted by the monitoring circuit to the analysis tool.

According to the present invention, monitoring circuit 18 transmits acorrelation message before or after the transmission of each datamessage. The correlation message comprises a counter equal to the numberof instructions executed by microprocessor 12 between the instructioncausing the data message which has just been transmitted or which willbe transmitted and the instruction causing the previous data messagewhich has been transmitted. Based on the counters provided by thecorrelation messages, analysis tool 24 can perform in sure fashion acorrelation between the data message which has just been received orwill be received and a program instruction.

FIG. 2 shows an example of a digital correlation message according tothe present invention.

The correlation message comprises a first field TCODE comprising a fixednumber of bits and equal to a code identifying the correlation message.

A second field SRC of the correlation message comprises a variablenumber of bits and indicates whether monitoring circuit 18simultaneously exchanges data with several microprocessors or whethermonitoring circuit 18 exchanges data with a same microprocessorsimultaneously executing several different programs. The second fieldcontains no bit in the case where monitoring circuit 18 is connected toa single microprocessor 12 which executes a single program.

A third field EVENT of the correlation message comprises a variablenumber of bits and is equal to an identifier of the data messageassociated with the correlation message. According to the number ofpossible types of data messages that can be associated with acorrelation message, the size of field EVENT is smaller or larger. Themost frequent data messages for example correspond to a messagerepresentative of a read or write instruction, to a message indicatingthat certain operation conditions of the microprocessor are fulfilled orto a message indicating the occurrence of a specific event which doesnot necessarily depend on the operation of microprocessor 12. In thelast example, the specific event for example corresponds to thereception by microprocessor 12 of a signal indicating that the chargelevel of the batteries supplying chip 10 is below a determinedthreshold. It may also be, for an application to mobile telephony, thetransmission of a signal for controlling the blanking of a portabletelephone screen. Further, standard IEEE-ISTO-5001 enables a user toprovide personalized messages in addition to the messages explicitlyprovided by the standard. The personalized messages are then consideredas data messages and the transmission of a personalized message ispreceded or followed by the transmission of a correlation message.

A fourth field ICNT of the correlation message comprises a variablenumber of bits and indicates the number of instructions of the programexecuted by microprocessor 12 between the instruction causing thetransmission of the data message associated with the correlation messageand the instruction causing the transmission of the last data message.

The correlation messages are used by analysis tool 24 to have a programinstruction executed by microprocessor 12 correspond to each datamessage. To achieve this result, analysis tool 24 also uses the programtracing messages for which the assignment of a program instruction willgenerally not be a problem. Thereby, when the user inhibits the functionof sending of program tracing messages by monitoring circuit 18, nofurther correlation messages are transmitted.

The correlation message may be transmitted with any type of data messageor with specific data message types. According to standardIEEE-ISTO-5001, each message transmitted by monitoring circuit 18comprises a code identifying the message type. When monitoring circuit18 generates a message, it detects the code identifying the generatedmessage to associate or not a correlation message with the generatedmessage.

The present invention has many advantages:

First, it enables ensuring an unambiguous correlation between eachmessage received by the analysis tool and an instruction of the programexecuted by the microprocessor.

Second, it enables limiting the number of additional data to betransmitted by the monitoring circuit. Indeed, the correlation messageprovided by the present invention comprises an instruction counterhaving a reduced size and, in particular, smaller than that of acomplete instruction address used by the synchronization message.

Third, it enables simplifying the algorithms used by the analysis toolto establish the correlation between the received messages and theprogram instructions.

Fourth, the present invention enables not modifying the messages alreadyprovided by standard IEEE-ISTO-5001 since it only provides adding a newcorrelation message.

Of course, the present invention is likely to have various alterations,modifications, and improvements which will readily occur to thoseskilled in the art. In particular, it may be provided for the monitoringcircuit to directly receive certain signals through the chipinput/output terminals. Such signals may be used for the detection bythe monitoring circuit of events for which it is desired to indicate tothe analysis tool that they have occurred.

1. A method for transmitting digital messages through output terminals of a monitoring circuit integrated to a microprocessor, said messages being representative of determined events occurring on execution of instructions by the microprocessor, comprising, after or before transmission of at least one specific message associated with a specific event, transmitting a correlation message comprising an identifier of said specific message and a counter of the number of instructions executed by the microprocessor between the instruction associated with the transmission of said specific message and the instruction associated with the transmission of a selected previous message.
 2. The method of claim 1, in which the selected previous message is the immediately preceding specific message.
 3. The method of claim 1, in which the correlation message comprises a correlation message identifier.
 4. The method of claim 1, in which the specific digital message is representative of a data read or write instruction.
 5. The method of claim 1, in which the specific digital message is representative of an event independent from the execution of an instruction by the microprocessor.
 6. The method of claim 1, in which the transmitted digital messages are received by an analysis tool capable of associating based on correlation messages an instruction executed by the microprocessor with each transmitted digital message.
 7. A device for transmitting digital messages through output terminals of a monitoring circuit integrated to a microprocessor, said digital messages being representative of determined events occurring on execution of instructions by the microprocessor, comprising: means for detecting whether a message to be transmitted by the monitoring circuit is of a specific type; and means for transmitting, after or before transmission of a digital message of said specific type, a correlation message, said correlation message comprising an identifier of said specific digital message and a counter of the number of instructions executed by the microprocessor between the instruction associated with the transmission of the specific digital message and the instruction associated with the transmission of a selected previous digital message. 